<% if users.empty? %>
<p><%= :no_users_found.l %></p>
<% else %>
<table class="list">
<thead>
  <tr>
    <th><%= :name.l %></th>
    <th><%= :profile_field_email.l %></th>
    <th><%= :profile_field_branch_joining_date.l %></th>
    <th><%= :profile_field_current_status.l %></th>
    <th><%= :profile_field_current_role.l %></th>
    <th>&nbsp;</th>
  </tr>
</thead>
<tbody>
<% users.each do |user| %>
<tr>
  <td><%= link_to user.render, resource_url(user) %></td>
  <td><%= h user.email %></td>
  <td><%= user.branch_joining_date ? user.branch_joining_date.l(:long) : ''%></td>
  <td><%=h user.current_role %></td>
  <td><%=h user.current_status%></td>
  <td><%= link_to :impersonate.l, impersonate_admin_user_url(user) %></td>
</tr>
<% end %>
</tbody>
</table>
<% end %>